home *** CD-ROM | disk | FTP | other *** search
/ TPUG - Toronto PET Users Group / TPUG Users Group CD / TPUG Users Group CD.iso / AMIGA / (A)TB / (A)TBM.ADF / Utilities / bootmenu.source < prev    next >
Text File  |  1991-04-20  |  26KB  |  819 lines

  1. ; BootMenu by J Davis 09/1990
  2. ;
  3. ; version 1.0 - beta 05
  4. ;
  5. ; assembled using HiSoft DevPac v2
  6. ;
  7. ; a little program to allow choice of NTSC/PAL screen mode
  8. ; and expansion boards enabled/disabled at boot-time
  9. ;
  10. ; hangs around via both cool and coldcapture (see note 1)
  11. ;
  12. ; on each reboot puts up a menu allowing mode choice
  13. ;
  14. ; if there's no input in 10 secs, it defaults to the left most
  15. ; option ( PAL and boards ON respectively )
  16. ;
  17. ;
  18. ; note 1 : on machines with 1mb of chip, due to a slight oversight
  19. ;        in the 1.3/1.2 kickstart reset routine, EVERY reboot causes
  20. ;      a TOTAL system rebuild. This of course makes it hard to make
  21. ;          our code hang around.
  22. ;
  23. ;     Hence, we add a coldcapture handler that fixes the bug,
  24. ;          then run our menu routine of coolcapture
  25. ;
  26. ;     Hence our coldcapt routine also acts as an IMPROVED setpatch R,
  27. ;     in that two reboots in a row KILLS setpatch r, wheras ours,
  28. ;     hangs around and hence protects RAD: properly. Therefore
  29. ;     DO NOT use SetPatch r and BootMenu at the same time!
  30. ;
  31. ;
  32. ; note 2 : if do_addemem is set to 1, this will build a version
  33. ;          that does an addmem of memory on the ronin 020 board
  34. ;          on the fly, due to the ronin mem not being dma-able we
  35. ;          have to set a low pri on the mem
  36. ;
  37.  
  38.         ; turn on debug info and turn off optimising
  39.         OPT D+
  40.         OPT     O-
  41.  
  42. ;======================
  43.  
  44. do_addmem   equ 0   ; flag for whether we do an addmem
  45.                 ; for hurricane board as well
  46.  
  47. ;======================
  48.  
  49.  
  50.     IFNE    do_addmem=1
  51.         FORMAT 0-,1-,2-
  52.         LIST
  53.         ; building PBMC_BootMenu
  54.         NOLIST
  55.         output  PBMC_BootMenu
  56.     ELSEIF
  57.         FORMAT 0-,1-,2-
  58.         LIST
  59.         ; building normal BootMenu
  60.         NOLIST
  61.         output  bootmenu
  62.     ENDC
  63.  
  64. chip_addr   equ $40000  ; where we swap our chip data to/from
  65.  
  66. ; process structure offsets
  67.  
  68. pr_cli      equ $0Ac    ; process cli flag offset
  69. pr_msgport  equ $05c    ; process msgport offset
  70.  
  71. ; execbase structure offsets
  72.  
  73. coldcapture equ $02a
  74. coolcapture equ $02e
  75. sysstklower equ $03a
  76.  
  77. ; misc library functions
  78.  
  79. forbid      equ -$084   ; offsets for various exec and int calls
  80. getmsg      equ -$174   ; saves long includes and compile times
  81. replymsg    equ -$17a
  82. waitport    equ -$180
  83. findtask    equ -$126
  84. autoreq     equ -$15c
  85. openlib     equ -$228
  86. closelib    equ -$19e
  87.  
  88. output      equ -$003c
  89. write       equ -$0030
  90.  
  91. openlibrary equ -$0228
  92. closelibrary    equ -$019e
  93.  
  94. addmemlist  equ -618
  95.  
  96. ; hardware equates
  97.  
  98. potgor      equ $dff016
  99. potgo       equ $dff034
  100.  
  101. intreq      equ $dff09c
  102. intreqr     equ $dff01e
  103.  
  104. ddfstart    equ $dff092
  105. ddfstop     equ $dff094
  106.  
  107. diwstart    equ $dff08e
  108. diwstop     equ $dff090
  109.  
  110. bpl1mod     equ $dff108
  111.  
  112. bplcon1     equ $dff102
  113. bplcon0     equ $dff100
  114.  
  115. r_color0    equ $0180
  116. r_color1    equ $0182
  117.  
  118. r_bpl1pth   equ $00e0
  119. r_bpl1ptl   equ $00e2
  120.  
  121. cop1lch     equ $dff080
  122. cop1lcl     equ $dff082
  123. copjmp1     equ $dff088
  124.  
  125. dmacon      equ $dff096
  126.  
  127. agnusdetect equ $dff004
  128.  
  129. ;==============================================================
  130.  
  131. startup:    ; startup code - determine if run from wb/cli etc
  132.  
  133.         move.l  $4,a6
  134.         move.l  #0,a1
  135.         jsr findtask(a6)        ; find ourselves
  136.  
  137.         move.l  d0,a4           ; save our process pointer
  138.  
  139.         move.l  pr_cli(a4),d0
  140.         bne fromdos         ; was a DOS startup
  141.  
  142.         ; was started from WB
  143.  
  144. fromwb:     lea pr_msgport(a4),a0
  145.         jsr waitport(a6)        ; wait for startup msg
  146.         lea pr_msgport(a4),a0
  147.         jsr getmsg(a6)      ; get the wb msg
  148.  
  149.         move.l  d0,wbmsg        ; save pointer to our startup msg
  150.         move.l  #1,wb           ; flag we started from wb
  151.  
  152.         lea intuiname,a1
  153.         move.l  #0,d0
  154.         move.l  $4,a6
  155.         jsr openlib(a6)         ; open intuition lib
  156.  
  157.         move.l  d0,a6           ; save ibase
  158.  
  159.         move.l  #0,a0           ; window to display in
  160.         move.l  #bodyitext1,a1      ; body text
  161.         move.l  #gaditext,a2        ; postive text
  162.         move.l  #gaditext,a3        ; negative text
  163.         move.l  #0,d0           ; pflags
  164.         move.l  #0,d1           ; nflags
  165.         move.l  #370,d2         ; width
  166.         move.l  #80,d3          ; height
  167.         jsr autoreq(a6)     ; request user confirmation
  168.  
  169.         move.l  a6,a1           ; close intuition lib
  170.         move.l  $4,a6
  171.         jsr closelib(A6)
  172.  
  173.         bsr install         ; install ourselves
  174.  
  175.         bra exit
  176.  
  177. fromdos:    ; was run from dos - output message to stdout
  178.  
  179.         move.l  $4,a6
  180.         lea dosname,a1
  181.         move.l  #$0,d0
  182.         jsr openlibrary(a6)     ; open dos library
  183.  
  184.         move.l  d0,a6           ; save dos base
  185.  
  186.         jsr output(a6)      ; get handle on stdout
  187.  
  188.         move.l  d0,d1           ; get file handle
  189.         move.l  #msgtxt,d2
  190.         move.l  #etext-msgtxt,d3
  191.         jsr write(a6)       ; put up a message saying we're installed
  192.  
  193.         move.l  $4,a6
  194.         move.l  a6,a1
  195.         jsr closelibrary(a6)    ; close dos
  196.  
  197.         bsr install
  198.  
  199. exit:       move.l  wb,d0
  200.         cmp.l   #0,d0           ; was this a CLI invocation
  201.         beq exit_dos        ; DOS - just exit
  202.  
  203.         ; workbench exit
  204.  
  205.         move.l  $4,a6
  206.         jsr forbid(a6)      ; lock out everyone else
  207.  
  208.         move.l  wbmsg,a1
  209.         jsr replymsg(a6)        ; reply to Wbstartup msg
  210.  
  211. exit_dos:   move.l  #0,d0           ; return with return code 0
  212.         rts
  213.  
  214. ;=================================================
  215.         even
  216. wb:     dc.l    0           ; run mode flag 0=dos process 1=wbprocess
  217. wbmsg:      dc.l    0           ; where we save our workbench msg
  218.  
  219.         even
  220. intuiname:  dc.b    "intuition.library",0
  221.  
  222.         even
  223. dosname:    dc.b    "dos.library",0
  224.  
  225.         ; message we output for cli startup
  226.     IFNE    do_addmem=1
  227. msgtxt:     dc.b    27,"[33mBootMenu PBMC",27,"[0m, by J Davis 09/1990",10
  228.     ELSEIF
  229. msgtxt:     dc.b    27,"[33mBootMenu v1.0",27,"[0m, by J Davis 09/1990",10
  230.     ENDC
  231.         dc.b    "installed ok - menu will become active at next
  232.         reboot",10,0
  233. etext:      dc.b    0
  234.  
  235.         even
  236.  
  237.         ; stuff for our autorequester for wb usage
  238. bodyitext1: dc.b    2       ; front pen
  239.         dc.b    1       ; back pen
  240.         dc.b    0       ; draw mode
  241.         dc.w    40      ; leftedge
  242.         dc.w    6       ; topedge
  243.         dc.l    0       ; textattr = default
  244.         dc.l    bodytext1   ; actual text
  245.         dc.l    bodyitext2      ; next
  246.  
  247. bodyitext2: dc.b    3       ; front pen
  248.         dc.b    0       ; back pen
  249.         dc.b    0       ; draw mode
  250.         dc.w    120     ; leftedge
  251.         dc.w    26      ; topedge
  252.         dc.l    0       ; textattr = default
  253.         dc.l    bodytext2   ; actual text
  254.         dc.l    bodyitext3  ; next
  255.  
  256. bodyitext3: dc.b    3       ; front pen
  257.         dc.b    0       ; back pen
  258.         dc.b    0       ; draw mode
  259.         dc.w    20      ; leftedge
  260.         dc.w    36      ; topedge
  261.         dc.l    0       ; textattr = default
  262.         dc.l    bodytext3   ; actual text
  263.         dc.l    0       ; next
  264.  
  265. gaditext:   dc.b    0       ; front pen
  266.         dc.b    0       ; back pen
  267.         dc.b    0       ; draw mode
  268.         dc.w    4       ; leftedge
  269.         dc.w    4       ; topedge
  270.         dc.l    0       ; textattr = default
  271.         dc.l    gadtext     ; actual text
  272.         dc.l    0       ; next
  273.  
  274.         ; actual text for our requester
  275.  
  276.     IFNE    do_addmem=1
  277. bodytext1:  dc.b    "BootMenu PBMC, by J Davis 09/1990",0
  278.         ELSEIF
  279. bodytext1:  dc.b    "BootMenu v1.0, by J Davis 09/1990",0
  280.     ENDC
  281. bodytext2:  dc.b    "installed ok",0
  282. bodytext3:  dc.b    "menu will become active at next reboot",0
  283. gadtext:    dc.b    "Ok",0
  284.  
  285. ;=====================================================
  286.  
  287.         even
  288.  
  289. install:    ; this routine does the actual cold/coolcapture
  290.         ; setting
  291.  
  292.         ; works out where we're going to install to
  293.         ; then copies handler code there and hooks vectors
  294.  
  295.         move.l  $4,a6
  296.         move.l  sysstklower(A6),a0          ; get pointer to base of
  297.                                               sys-stack
  298.         move.l  a0,codetarget               ; save pointer to address
  299.  
  300.         move.l  a0,a1
  301.         add.l   #coldcapt-captstart,a1          ; point to coldcapt
  302.                                                   address
  303.         move.l  a1,coldcaptaddr             ; save address
  304.  
  305.         move.l  a0,a1
  306.         add     #coolcapt-captstart,a1          ; point to coolcapt
  307.                                                   addres
  308.         move.l  a1,coolcaptaddr             ; save address
  309.  
  310.         ; now stuff our code away on the bottom of the system stack
  311.  
  312.         lea captstart(pc),a1            ; code to copy
  313.         move.l  codetarget,a2               ; where to copy to
  314.         move.l  #endcapt-captstart,d0           ; amount to copy
  315. mloop:      move.b  (a1)+,(a2)+
  316.         dbf d0,mloop
  317.  
  318.         ; now install a vector to the copied code in execbase.coldcapture
  319.  
  320.         move.l  $4,a6                   ; get execbase
  321.         move.l  coldcaptaddr,a0         ; address of our coldcap
  322.                                           routine
  323.         move.l  a0,coldcapture(a6)      ; set coldcapture
  324.  
  325.         move.l  coolcaptaddr,a0         ; address of our coolcap
  326.                                           routine
  327.         move.l  a0,coolcapture(a6)      ; set coolcapture to our code
  328.  
  329.         ; finally, recalc the execbase checksum
  330.  
  331.         lea 34(a6),a0               ; start of checksummed area in
  332.                                       execbase
  333.         move.w  #$16,d0             ; number of checksummed words
  334.         move.w  #$0,d1                  ; clear counter
  335.  
  336. sum:        add.w   (A0)+,d1        ; sum execbase and update
  337.                                       checksum
  338.         dbf d0,sum
  339.  
  340.         not.w   d1
  341.         move.w  d1,82(a6)               ; set new execbase checksum
  342.  
  343.         ; all done
  344.         rts
  345.  
  346.         even
  347.  
  348. codetarget: dc.l    0
  349. coolcaptaddr:   dc.l    0
  350. coldcaptaddr:   dc.l    0
  351.  
  352. ;==============================================================
  353. ;
  354. ; our capture routines
  355. ;
  356. ; since this is going to stick around, we need to copy
  357. ; it somewhere safe - like the SysStack area
  358. ;
  359. ; since we can't guarantee sys-stack will be in chip, we
  360. ; swap our bitplane data and copper list to chip mem on the fly
  361. ; and then swap it back out ( in case rad: was using the bit where
  362. ; we put our screen ! )
  363.  
  364.         even
  365.  
  366. captstart:
  367.  
  368. coldcapt:   ; this is our coldcapture routine - basically
  369.         ; fixes the rebuild problem that SETPATCH R tries
  370.         ; ( but fails ) to
  371.  
  372.         ; CAUTION!! This code is _specific to kickstart 1.x
  373.         ; DO NOT USE WITH KickStart 2.x!!!
  374.  
  375.         ; important - reinsert our code into execbase, as coldcapt
  376.         ; is cleared before it's called!! this is what setpatch r
  377.         ; fails to do (and hence why it's not reliable)!
  378.  
  379.         lea coldcapt(pc),a0             ; on entry A6=execbase
  380.         move.l  a0,coldcapture(a6)      ; reset our vector in
  381.                                        execbase - don't need to resum
  382.  
  383.         ; the following is a kludge to get around exec 34.x
  384.         ; insisting on doing a system rebuild if >512k chip
  385.         ; it is directly based on the rom code in ks1.2/1.3
  386.  
  387.         bchg    #1,$bfe001              ; toggle led on
  388.  
  389.         move.l  $fc0010,d0              ; get ks ver no.
  390.         cmp.l   $14(a6),d0              ; compare with execbase ver
  391.         bne.s   rebuild_all
  392.  
  393.         ; the following is the bit that's wrong with ks1.x
  394.         ; now fixed to work with 1mb chipmem
  395.  
  396.         move.l  $3e(a6),a3              ; get maxchipmem
  397.         cmpa.l  #$100000,a3             ; more than 1mb chip ?
  398.         bhi.s   rebuild_all
  399.  
  400.         add.l   #$1e,a5                 ; point A5 past the
  401.                                           (incorrect) code we skip
  402.         jmp (A5)                    ; carry on with rest of boot
  403.  
  404. rebuild_all:    jmp $fc01ce          ; jump to rom rebuild code
  405.  
  406. ;====================================================================
  407.  
  408.         even
  409.  
  410. coolcapt:   ; our coolcapture routine - actually does the menus etc
  411.  
  412.         movem.l d0-d7/a0-a6,-(a7)           ; save everything
  413.  
  414.         bsr swapmem                 ; first, copy our bitplane data
  415.                                       and copper list to chip mem
  416.  
  417.         move.w  #$ffff,potgo         ; set for button inputs on mouse
  418.  
  419.         ; finished setting up - ask whether to turn boards off
  420.  
  421.         move.l  #chip_addr+board_mode-chipdata_start,a1 ; address
  422. where bitplane data is copied to
  423.         bsr     doscreen                ; put up screen and wait for
  424.                                           choice
  425.  
  426.         btst    #0,d0
  427.         beq.s   next                    ; left mouse=leave on so skip
  428.  
  429.         ; user requested expansion board disable - do it
  430.  
  431.         moveq.l #$7,d1                  ; max no boards we fix = 8
  432.  
  433. bchk:       move.w  $e80008,d0          ; get flag byte from board
  434.         not.w   d0                  ; invert
  435.         btst.l  #14,d0                  ; see if board supports
  436.                                           shut_up
  437.         beq.s   shut_up                 ; bit=0 means board shuts up
  438.                                           ok
  439.  
  440.         ; board doesn't support shut up, so
  441.         ; config board to $200000 (only gap big enough for 8mb
  442.           boards)
  443.  
  444.         move.w  #$0000,$e8004a        ; fake board out to $200000
  445.         move.w  #$2000,$e80048
  446.  
  447.         bra.s   nboard                  ; carry on
  448.  
  449. shut_up:    move.b  #$ff,$e8004c        ; tell the board to shut up
  450.  
  451. nboard:     dbf d1,bchk                 ; loop thru all boards
  452.  
  453.         ; now query for screen mode
  454. next:       ; see if this machine has the 1mb Agnus
  455.  
  456.         move.w  agnusdetect,d0
  457.         and.w   #$2000,d0
  458.         beq.s   no_8372                 ; doesn't have obese agnus -
  459.                                           skip screen mode choice
  460.  
  461.         ; has the 1mb agnus, offer screen mode choice
  462.  
  463.         move.l  #chip_addr+scr_mode-chipdata_start,a1   ; address
  464.                                  where bitplane data is copied to
  465.         bsr doscreen                ; put up screen and wait for
  466.                                       choice
  467.  
  468.         btst    #0,d0                   ; left mouse = PAL
  469.         beq.s   go_pal
  470.  
  471.         move.w  #$0000,$dff1dc              ; set NTSC mode on agnus
  472.         bra.s   no_8372
  473.  
  474. go_pal:     move.w  #$0020,$dff1dc          ; set PAL mode on agnus
  475.  
  476. no_8372:    bsr swapmem                 ; finally restore chipmem
  477.  
  478.     IFNE do_addmem=1
  479.  
  480.         FORMAT  0-,1-,2-
  481.         LIST
  482.         ; adding special addmem code!
  483.         NOLIST
  484.  
  485.         ; Addmem the 32 bit mem on the Ronin 020 board
  486.         ; into the system
  487.         ;
  488.         ; we add 1mb, starting at $600000
  489.  
  490.         move.l  $4,a6       ; get execbase
  491.         move.l  #$100000,d0 ; amount of mem we're adding ( 1mb )
  492.         move.l  #$5,d1      ; attributes ( memf_fast | memf_public )
  493.         move.l  #-20,d2     ; pri of mem must be low so as to force
  494.                               HD to use chip!!!
  495.         move.l  #$600000,a0 ; where the mem starts ( 6 mb )
  496.         move.l  #0,a1       ; pointer to a name for this block
  497.                     ; don't want one so pass NULL
  498.         jsr addmemlist(a6)  ; do the deed !!!
  499.  
  500.         ; you need to be careful after this to NOT run the
  501.         ; ronin addmem prog - as otherwise you will get the
  502.         ; same block of mem added TWICE ( can you say 'guru' ? :-)
  503.     ENDC
  504.  
  505.         movem.l (A7)+,d0-d7/a0-a6           ; get back all regs
  506.         rts
  507.  
  508.  
  509. ; ===============================
  510. ; this routine swaps chipdata into/out of a block of chipmem
  511.  
  512. swapmem:    lea chipdata_start(pc),a0           ; where to copy from
  513.         move.l  #chip_addr,a1               ; where we copy to
  514.         move.l  #chipdata_end-chipdata_start,d0     ; amount to copy
  515.  
  516. cm_loop:    move.b  (a0),d1                 ; we exchange data in and
  517.                                               out
  518.         move.b  (a1),d2
  519.         move.b  d2,(a0)+
  520.         move.b  d1,(a1)+
  521.         dbf d0,cm_loop
  522.  
  523.         rts
  524.  
  525.  
  526. ;====================================
  527. ; this subroutine puts up the screen pointed to by a1
  528. ; and return d0=0 for left mouse and d0<>0 for right mouse
  529. ; also trashes d1
  530.  
  531. doscreen:   ; setup screen hardware
  532.  
  533.         move.w  #$1200,bplcon0              ; set for lores, 1 plane
  534.         move.w  #$0000,bplcon1
  535.  
  536.         move.w  #$0000,bpl1mod              ; modulo = 0
  537.  
  538.         move.w  #$0038,ddfstart             ; data fetch start
  539.         move.w  #$00d0,ddfstop              ; data fetch stop
  540.  
  541.         move.w  #$7081,diwstart             ; display window start
  542.         move.w  #$89b0,diwstop              ; display window stop
  543.  
  544.         move.l  a1,d0                   ; setup up copper list
  545.                                           bitplane pointers
  546.         move.w  d0,chip_addr+screen_l-chipdata_start    ; point cop1l
  547.                                              load addr to right place
  548.         swap    d0
  549.         move.w  d0,chip_addr+screen_h-chipdata_start    ; point cop1h
  550.                                              load addr to right place
  551.  
  552.         move.l  #chip_addr+ourcoplist-chipdata_start,cop1lch ; point
  553.                                            copper at our copper list
  554.  
  555.         move.w  copjmp1,d0              ; force copper to our list
  556.  
  557.         move.w  #%1000000110000000,dmacon       ; enable bitplane and
  558.                                                            copper dma
  559.  
  560.         move.w  #10*50,d1               ; 10 secs worth of vblanks
  561.                                                     before timeout
  562.  
  563. waittof:    move.w  intreqr,d0
  564.         btst    #5,d0                   ; vblank int ?
  565.         beq.s   waittof                 ; wait until tof true
  566.  
  567.         move.w  #$0020,intreq               ; clear int
  568.  
  569.         btst    #6,$bfe001              ; left button down ?
  570.         beq.s   lmb
  571.  
  572.         btst    #10,potgor              ; right button down
  573.         beq.s   rmb
  574.  
  575.         subq.w  #$1,d1                  ; dec frame counter
  576.         cmp.w   #$0,d1                  ; time up ?
  577.         beq.s   lmb                 ; default to left mouse button
  578.  
  579.         bra.s   waittof
  580.  
  581. lmb:        moveq   #0,d0
  582.         bra.s   _exit_1
  583.  
  584. rmb:        moveq   #1,d0
  585.  
  586. _exit_1:    ; debounce buttons to avoid 'fallthru' - wait for both
  587.                                                         buttons up
  588.  
  589.         btst    #10,potgor
  590.         beq _exit_1                 ; wait for user to let go of rmb
  591.  
  592.         btst    #6,$bfe001
  593.         beq _exit_1                 ; wait for user to let go of rmb
  594.  
  595.         ; now delay 15 vblanks to allow buttons to settle
  596.  
  597.         move.w  #15,d2
  598.  
  599. _1waittof:  move.w  intreqr,d1
  600.         btst    #5,d1                   ; vblank int ?
  601.         beq.s   _1waittof               ; wait until tof true
  602.  
  603.         move.w  #$0020,intreq               ; clear int
  604.  
  605.         subq.w  #1,d2                   ; dec delay counter
  606.         cmp.w   #$0,d2
  607.         bne _1waittof
  608.  
  609.         move.w  #%0000000110000000,dmacon       ; disable bitplane
  610.                                                     and copper dma
  611.  
  612.         rts
  613.  
  614. ;=========================================
  615.  
  616.         ; message for people running VMK etc
  617.  
  618.         dc.b    "  BootMenu v1.0 J Davis - this is NOT a virus!!!"
  619.  
  620. ;=========================================
  621.  
  622.         even
  623.  
  624. chipdata_start:
  625.  
  626. ourcoplist: ; the following copperlist runs our screen
  627.  
  628.         dc.w    r_bpl1pth
  629. screen_h    dc.w    0       ; set high bitplane address
  630.  
  631.         dc.w    r_bpl1ptl
  632. screen_l    dc.w    0       ; set low bitplane address
  633.  
  634.         dc.w    r_color0
  635.         dc.w    $0026       ; set background
  636.  
  637.         dc.w    $6f01,$ff00 ; wait for top of our display
  638.  
  639.         dc.w    r_color1
  640.         dc.w    $0fff       ; set fg
  641.  
  642.         dc.w    $7101,$ff00 ; wait til after top line
  643.  
  644.         dc.w    r_color1
  645.         dc.w    $0f08       ; set fg
  646.  
  647.         dc.w    $7c01,$ff00 ; wait for next bit of text
  648.  
  649.         dc.w    r_color1
  650.         dc.w    $006c       ; set fg
  651.  
  652.         dc.w    $8801,$ff00 ; wait for bottom line
  653.  
  654.         dc.w    r_color1
  655.         dc.w    $0fff       ; set fg
  656.  
  657.         dc.w    $ffff,$fffe ; wait for next TOF
  658.  
  659.         ; the following is the bit map for out first screen
  660.  
  661. board_mode: dc.l    $ffffffff,$ffffffff,$ffffffff,$ffffffff,$ffffffff,$ffffffff,$fffff
  662.    fff,$ffffffff,$ffffffff,$ffffffff
  663.          dc.l
  664.    $00000000,$00000000,$00000000,$00000000,$00000000,$00000000,$00000
  665.     000,$00000000,$00000000,$00000000
  666.         dc.l
  667.    $00000000,$00000000,$00000000,$00000000,$00000000,$00000000,$00000
  668.    000,$00000000,$00000000,$00000000
  669.         dc.l
  670.    $0000038C,$60000000,$0000000F,$E0000000,$00018000,$000FC000,$0000E
  671.    000,$00000000,$00000000,$00000000
  672.         dc.l
  673.   $000006CE,$60000000,$00000006,$60000000,$00000000,$00066000,$00006
  674.    000,$00000000,$71FDFC00,$00000000
  675.         dc.l
  676.   $0007EC6F,$67E00000,$00000006,$063DC3C7,$C3E383C7,$C00663C3,$CEC36
  677.   3E0,$00000000,$D8CCCC00,$00000000
  678.         dc.l
  679.    $07E00C6D,$E007E000,$00000007,$83666066,$66018666,$6007C660,$6766E
  680.    600,$000000FD,$8CC0C0FC,$00000000
  681.         dc.l
  682.    $00000C6C,$E0000000,$00000006,$01C661E6,$63C18666,$60066661,$E6666
  683.    3C0,$0000FC01,$8CF0F000,$FC000000
  684.         dc.l
  685.    $0007E6CC,$67E00000,$00000006,$6367C666,$60618666,$60066666,$66066
  686.    060,$00000001,$8CC0C000,$00000000
  687.         dc.l
  688.   $0000038C,$60000000,$0000000F,$E63603B6,$67C3C3C6,$600FC3C3,$BF03B
  689.    7C0,$000000FC,$D8C0C0FC,$00000000
  690.         dc.l
  691.   $00000000,$00000000,$00000000,$000F0000,$00000000,$00000000,$00000
  692.   000,$00000000,$71E1E000,$00000000
  693.         dc.l
  694.   $00000000,$00000000,$00000000,$00000000,$00000000,$00000000,$00000
  695.   000,$00000000,$00000000,$00000000
  696.         dc.l
  697.   $00000000,$00000000,$00000000,$00000000,$00000000,$00000000,$00000
  698.    000,$00000000,$00000000,$00000000
  699.         dc.l
  700.   $00000000,$00000000,$00000000,$00000000,$00000000,$00000000,$00000
  701.    000,$00000000,$00000000,$00000000
  702.         dc.l
  703.   $000007E0,$00004000,$00000006,$18C001E0,$07E00000,$7007C000,$00C00
  704.    001,$E1E018C1,$E1E1E000,$00000000
  705.         dc.l
  706.   $00000330,$0000C000,$00000006,$19C00330,$03300000,$30036000,$00000
  707.    003,$333031C3,$33333000,$00000000
  708.         dc.l
  709.   $00000331,$E1E1F331,$E3E33003,$30C00370,$03333000,$300331E3,$31C1F
  710.    003,$733060C3,$33337000,$00000000
  711.         dc.l
  712.   $000003E3,$3330C3BB,$33333003,$30C003F0,$03E33000,$30033033,$30C300
  713.   03,$F1F0C0C1,$F1F3F000,$00000000
  714.         dc.l
  715.   $00000333,$3330C35B,$F3333001,$E0C003B0,$03333003,$300330F3,$30C1E0
  716.   03,$B03180C0,$3033B000,$00000000
  717.         dc.l
  718.   $00000333,$3330D31B,$03333001,$E0C0C330,$0331E003,$30036331,$E0C030
  719.   03,$306300C0,$60633000,$00000000
  720.         dc.l
  721.   $000007E1,$E1E06319,$E331D800,$C3F0C1E0,$07E0C001,$E007C1D8,$C1E3E0
  722.   01,$E1C603F1,$C1C1E000,$00000000
  723.         dc.l
  724.   $00000000,$00000000,$00000000,$00000000,$00038000,$00000000,$000000
  725.   00,$00000000,$00000000,$00000000
  726.         dc.l
  727.   $00000000,$00000000,$00000000,$00000000,$00000000,$00000000,$000000
  728.   00,$00000000,$00000000,$00000000
  729.         dc.l
  730.   $00000000,$00000000,$00000000,$00000000,$00000000,$00000000,$000000
  731.   00,$00000000,$00000000,$00000000
  732.         dc.l
  733.   $ffffffff,$ffffffff,$ffffffff,$ffffffff,$ffffffff,$ffffffff,$ffffff
  734.   ff,$ffffffff,$ffffffff,$ffffffff
  735.  
  736.         ; the following is the bitmap for our second screen
  737.  
  738. scr_mode:   dc.l
  739.   $ffffffff,$ffffffff,$ffffffff,$ffffffff,$ffffffff,$ffffffff,$ffffff
  740.   ff,$ffffffff,$ffffffff,$ffffffff
  741.         dc.l
  742.   $00000000,$00000000,$00000000,$00000000,$00000000,$00000000,$000000
  743.   00,$00000000,$00000000,$00000000
  744.         dc.l
  745.   $00000000,$00000000,$00000000,$00000000,$00000000,$00000000,$000000
  746.   00,$00000000,$00000000,$00000000
  747.         dc.l
  748.   $000007E0,$C7800000,$00000000,$00001E00,$00000000,$00410007,$000000
  749.   00,$0000018C,$FC787800,$00000000
  750.         dc.l
  751.   $00000331,$E3000000,$00000000,$00003300,$00000000,$00630003,$000000
  752.   00,$000001CC,$B4CCCC00,$00000000
  753.         dc.l
  754.   $0003F331,$E303F000,$00000000,$0000381E,$761E1E3E,$00771E1B,$1E0000
  755.   00,$0000FDEC,$30E180FC,$00000000
  756.         dc.l
  757.   $03F003E3,$330003F0,$00000000,$00001C33,$3B333333,$007F3337,$330000
  758.   00,$00FC01BC,$30718000,$FC000000
  759.         dc.l
  760.   $00000303,$F3100000,$00000000,$00000730,$333F3F33,$006B3333,$3F0000
  761.   00,$0000019C,$301D8000,$00000000
  762.         dc.l
  763.   $0003F306,$1B33F000,$00000000,$00003333,$30303033,$00633333,$300000
  764.   00,$0000FD8C,$30CCCCFC,$00000000
  765.         dc.l
  766.   $00000786,$1FF00000,$00000000,$00001E1E,$781E1E33,$00631E1D,$9E0000
  767.   00,$0000018C,$78787800,$00000000
  768.         dc.l
  769.   $00000000,$00000000,$00000000,$00000000,$00000000,$00000000,$000000
  770.   00,$00000000,$00000000,$00000000
  771.         dc.l
  772.   $00000000,$00000000,$00000000,$00000000,$00000000,$00000000,$000000
  773.   00,$00000000,$00000000,$00000000
  774.         dc.l
  775.   $00000000,$00000000,$00000000,$00000000,$00000000,$00000000,$000000
  776.   00,$00000000,$00000000,$00000000
  777.         dc.l
  778.   $00000000,$00000000,$00000000,$00000000,$00000000,$00000000,$000000
  779.   00,$00000000,$00000000,$00000000
  780.         dc.l
  781.   $000007E0,$00004000,$00000006,$18C001E0,$07E00000,$7007C000,$00C000
  782.   01,$E1E018C1,$E1E1E000,$00000000
  783.         dc.l
  784.   $00000330,$0000C000,$00000006,$19C00330,$03300000,$30036000,$000000
  785.   03,$333031C3,$33333000,$00000000
  786.         dc.l
  787.   $00000331,$E1E1F331,$E3E33003,$30C00370,$03333000,$300331E3,$31C1F0
  788.   03,$733060C3,$33337000,$00000000
  789.         dc.l
  790.   $000003E3,$3330C3BB,$33333003,$30C003F0,$03E33000,$30033033,$30C300
  791.   03,$F1F0C0C1,$F1F3F000,$00000000
  792.         dc.l
  793.   $00000333,$3330C35B,$F3333001,$E0C003B0,$03333003,$300330F3,$30C1E0
  794.   03,$B03180C0,$3033B000,$00000000
  795.         dc.l
  796.   $00000333,$3330D31B,$03333001,$E0C0C330,$0331E003,$30036331,$E0C030
  797.   03,$306300C0,$60633000,$00000000
  798.         dc.l
  799.   $000007E1,$E1E06319,$E331D800,$C3F0C1E0,$07E0C001,$E007C1D8,$C1E3E0
  800.   01,$E1C603F1,$C1C1E000,$00000000
  801.         dc.l
  802.   $00000000,$00000000,$00000000,$00000000,$00038000,$00000000,$000000
  803.   00,$00000000,$00000000,$00000000
  804.         dc.l
  805.   $00000000,$00000000,$00000000,$00000000,$00000000,$00000000,$000000
  806.   00,$00000000,$00000000,$00000000
  807.         dc.l
  808.   $00000000,$00000000,$00000000,$00000000,$00000000,$00000000,$000000
  809.   00,$00000000,$00000000,$00000000
  810.         dc.l
  811.   $ffffffff,$ffffffff,$ffffffff,$ffffffff,$ffffffff,$ffffffff,$ffffff
  812.   ff,$ffffffff,$ffffffff,$ffffffff
  813.  
  814. chipdata_end:
  815.  
  816. endcapt:
  817.  
  818.         END
  819.